n=4096; m=512; k=132; tube=[|3621,21,267| 1414,75,200| 2280,196,265| 2663,27,351| 3427,368,418| 1038,409,458| 866,376,382| 2058,444,487| 1681,457,459| 1511,326,500| 4007,171,318| 471,182,345| 2529,367,511| 2191,452,471| 1586,177,379| 2383,140,404| 3109,358,388| 1452,368,408| 1728,1,336| 39,112,482| 1075,367,441| 2346,88,288| 2700,198,253| 2802,19,286| 3146,493,503| 2478,1,181| 921,380,486| 709,193,385| 3947,406,442| 832,281,398| 390,370,414| 2469,167,320| 1971,242,249| 2547,264,417| 251,277,460| 384,106,275| 1658,176,491| 3226,336,458| 3535,504,512| 2014,98,380| 1643,466,495| 3827,231,383| 3511,86,177| 263,365,456| 2545,499,506| 74,138,303| 3113,428,468| 3993,210,411| 3002,363,388| 338,330,345| 2305,239,269| 1444,456,459| 560,17,267| 2331,141,314| 892,337,458| 2932,60,411| 117,334,340| 22,501,505| 3879,226,237| 26,426,459| 4029,361,498| 2662,369,491| 1876,137,457| 261,370,509| 694,328,486| 2997,287,352| 3103,338,416| 64,130,392| 2317,17,482| 1195,469,471| 1458,37,68| 649,208,392| 1492,208,269| 331,91,149| 3238,222,324| 2249,78,104| 2683,308,454| 3871,302,382| 3513,270,405| 3346,48,322| 3392,479,496| 2278,235,399| 563,317,454| 3215,183,383| 3965,484,493| 656,8,192| 2481,366,456| 3299,326,392| 3297,389,477| 959,255,281| 500,366,433| 3983,30,470| 1089,142,363| 3907,280,491| 120,321,441| 147,64,448| 416,309,499| 1533,354,469| 2811,331,357| 1015,225,291| 3999,9,422| 3815,185,419| 3382,480,488| 3173,50,427| 578,501,506| 1320,508,510| 2073,179,272| 2068,303,374| 3050,158,453| 853,16,389| 647,435,448| 11,345,357| 1160,478,501| 537,112,268| 434,468,503| 3585,450,490| 1878,66,432| 242,193,384| 3017,103,479| 3414,186,259| 1981,169,245| 3890,420,469| 989,458,485| 336,408,483| 2148,40,150| 237,154,371| 1391,335,507| 3104,350,438| 2609,42,281| 693,238,243| 3028,156,471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1,2,2,1,2,2,1]; Y=[167,252,93,196,395,466,440,72,410,289,104,3,145,391,71,95,298,411,93,146,450,10,236,382,391,34,249,28,472,208,231,235,120,407,212,171,109,18,228,446,30,58,482,112,470,440,109,206,281,424,110,132,231,34,20,23,430,278,133,315,197,280,391,502,42,125,465,336,388,100,321,423,185,113,52,408,127,10,117,118,382,293,482,487,470,238,180,503,322,154,498,94,193,71,71,467,414,259,332,230,277,43,89,278,121,256,449,188,435,423,414,429,66,188,379,176,341,73,235,312,254,430,372,304,332,273,49,23,334,495,85,345,361,327,224,423,150,140,430,288,115,453,207,245,142,214,370,124,415,287,49,76,11,175,115,131,479,343,4,170,287,355,397,348,400,427,320,102,190,227,210,500,413,318,391,33,343,296,337,2,255,129,387,361,489,321,416,348,98,205,115,127,97,142,27,131,28,311,473,431,203,95,23,408,53,80,339,97,85,341,365,359,204,246,286,72,390,85,65,4,66,268,241,296,74,404,69,270,378,405,154,113,99,427,146,263,480,72,366,8,475,318,103,288,49,89,114,233,366,342,50,178,96,211,72,341,70,68,192,125,504,441,397,285,277,218,175,311,85,172,196,192,132,421,86,51,230,151,109,334,501,167,403,402,456,133,47,373,55,485,299,186,467,115,212,417,456,349,22,307,269,90,219,461,216,365,425,498,342,412,6,227,356,280,271,311,482,327,318,430,182,503,305,427,31,145,100,464,403,290,275,158,473,419,233,285,77,462,206,484,177,239,456,188,406,477,39,399,80,262,99,168,279,29,494,192,86,403,93,345,29,140,385,34,316,233,298,62,501,5,75,99,82,158,37,144,253,99,278,63,394,465,152,228,73,97,395,290,169,122,407,237,6,258,434,333,71,496,269,347,412,471,111,244,153,452,104,164,480,375,181,208,450,457,356,20,207,9,212,54,90,380,155,285,404,15,297,307,381,426,511,466,408,492,198,439,27,464,290,289,338,238,492,357,253,43,189,443,438,176,440,380,378,104,26,322,151,469,81,444,42,59,451,282,380,469,17,246,142,22,198,498,391,447,226,261,322,449,260,94,133,403,372,510,455,137,347,457,50,154,228,511,174,282,124,34,411,373,30,257,376,98,499,405,419,280,428,173,184,491,303,36,416,440,253,418,34,311,31,26,218,73,25,192,157,482,167,117,399,501,214,224,395,236,195,362,22,19,137,221,349,224,182,44,384,192,439,301,421,203,269,500,456,304,185,357,188,11,376,437,70,302,499,287,99,496,15,113,459,7,397,122,399,442,153,495,452,203,359,320,450,280,245,391,265,292,233,206,2,383,471,360,123,306,12,410,387,382,43,264,132,424,424,468,238,52,162,64,445,238,467,373,282,414,473,87,177,424,101,498,177,7,416,95,422,261,437,176,333,499,211,338,57,460,88,478,435,74,42,160,469,313,509,73,23,65,118,93,126,314,454,444,236,188,142,196,223,492,454,8,97,166,458,355,267,252,404,59,174,388,66,398,54,493,399,439,44,182,336,46,166,284,465,186,78,410,103,415,146,119,352,2,139,386,208,38,201,416,152,265,104,340,426,329,96,78,477,315,245,51,77,283,392,415,228,229,283,505,268,242,242,266,365,295,226,7,416,52,427,312,75,459,70,44,263,172,76,168,491,10,279,491,273,463,448,316,260,353,187,139,137,411,205,108,2,372,101,447,333,19,117,265,53,163,469,161,52,289,111,439,480,391,107,411,196,182,219,146,8,493,65,42,186,372,182,391,40,203,69,42,482,18,125,427,454,80,24,107,418,489,219,222,111,387,478,412,124,94,64,364,401,475,37,106,6,15,450,465,117,197,241,19,493,86,105,18,349,386,35,297,46,231,20,1,508,202,277,74,300,270,49,365,236,239,202,278,319,215,149,441,396,365,334,387,38,509,400,467,74,361,202,11,92,314,408,368,357,420,132,301,408,239,133,403,356,466,347,6,158,134,18,329,194,25,5,463,80,180,336,402,274,177,305,498,468,483,93,331,9,53,153,392,145,411,82,116,130,448,457,336,27,370,95,374,17,84,397,368,8,494,41,429,374,45,272,205,176,386,236,358,130,388,389,28,494,470,92,178,224,240,75,251,475,505,340,434,248,435,26,506,440,15,323,452,382,3,97,195,345,242,11,98,441,368,451,441,298,382,120,143,485,430,366,113,285,356,469,10,426,336,211,216,194,89,375,287,345,402,301,366,309,337,105,137,196,368,195,371,142,173,147,353,120,147,199,478,179,246,122,286,328,179,213,382,481,359,486,64,395,482,194,62,224,112,162,118,27,483,318,66,380,371,65,415,116,14,307,138,365,348,119,472,234,353,269,295,299,474,76,294,252,468,365,49,311,202,334,32,78,64,274,483,1,391,296,219,464,66,237,504,478,433,339,307,320,252,218,111,125,262,148,439,128,401,59,352,59,292,194,303,441,52,217,349,121,250,36,335,138,479,90,204,65,35,39,227,331,115,409,361,2,253,245,153,284,51,423,506,206,201,333,211,162,171,228,44,104,235,340,202,506,453,474,360,459,395,460,415,371,153,63,300,444,497,393,351,423,277,212,9,158,407,448,216,353,394,4,53,189,191,224,441,291,471,300,134,338,36,324,70,59,36,102,509,125,327,186,435,415,451,346,116,70,430,369,14,435,489,120,266,114,49,306,248,349,395,212,323,134,131,229,402,161,129,305,492,460,206,479,446,81,467,311,30,7,403,271,340,128,168,335,322,160,9,422,410,255,267,115,466,423,309,90,86,61,121,368,151,427,110,102,327,357,379,329,33,147,406,461,437,200,390,456,55,172,196,171,103,45,439,286,86,285,141,454,212,95,181,87,394,382,4,58,25,43,443,407,233,508,381,422,65,139,508,448,483,436,344,49,52,304,419,511,346,481,415,248,349,181,84,207,436,509,97,108,136,115,50,152,78,51,464,444,173,102,198,279,424,373,321,125,348,468,320,249,180,362,70,401,359,466,268,167,493,156,476,232,486,167,263,149,171,47,261,449,423,152,110,342,298,377,234,31,252,454,69,413,74,446,379,409,259,436,319,443,220,366,373,101,66,84,118,324,411,476,114,25,406,197,183,301,403,311,24,345,423,175,380,204,229,30,14,155,483,88,462,29,15,74,207,80,302,147,209,432,485,236,484,373,213,97,320,484,448,325,431,261,114,374,213,233,212,141,331,111,430,179,316,29,164,363,213,287,486,122,394,340,294,262,450,129,37,78,409,61,411,111,7,423,2,151,354,473,443,217,53,221,108,408,372,33,363,368,12,349,279,407,462,224,65,230,257,173,220,336,26,352,510,230,470,22,23,325,254,317,461,402,468,43,131,240,219,17,255,211,280,417,117,226,251,160,65,389,112,181,282,382,468,189,84,408,104,122,511,63,378,417,256,431,198,82,488,451,302,127,16,222,304,322,163,9,79,440,207,173,411,355,159,287,422,318,388,12,339,450,190,3,355,58,242,422,452,511,16,32,139,330,345,178,146,145,30,59,30,386,330,395,17,353,136,436,205,289,51,193,39,4,437,420,146,226,46,218,487,62,442,369,224,157,54,455,143,128,472,7,314,54,308,406,329,378,437,378,333,392,323,462,249,501,98,300,195,228,113,274,45,157,327,88,508,7,270,257,2,184,210,463,309,396,284,302,250,282,464,196,304,252,126,53,211,195,176,314,308,345,339,391,82,125,498,478,490,336,198,200,65,302,12,180,285,366,131,173,374,214,74,108,381,125,288,459,174,48,336,471,223,205,42,22,146,233,398,240,255,317,160,350,481,501,96,398,257,112,451,186,367,273,230,503,364,483,29,328,175,272,233,29,233,243,272,241,319,347,497,490,119,328,239,113,412,141,15,78,293,418,206,148,101,18,305,403,441,42,315,38,11,316,331,271,171,132,277,372,230,447,353,445,510,434,97,1,106,132,167,4,53,201,382,178,418,106,436,14,492,219,375,185,504,388,191,479,493,28,196,446,303,330,46,117,247,88,11,46,44,129,280,445,231,97,151,481,39,136,114,94,75,437,436,56,387,171,248,400,33,362,494,92,102,89,478,32,347,79,423,207,286,437,449,469,293,121,106,264,423,373,6,398,345,80,83,10,120,374,259,10,106,283,326,401,370,82,139,200,428,195,21,351,123,180,1,389,303,317,194,321,436,411,355,3,329,238,370,473,257,346,314,347,367,190,309,85,370,281,34,451,448,200,237,271,285,207,312,177,161,201,333,192,237,387,227,105,487,453,448,163,301,292,395,236,307,2,178,303,137,140,472,495,20,117,105,145,120,457,377,47,90,283,225,153,204,181,9,68,41,463,430,6,5,25,116,25,103,456,333,144,358,172,456,362,375,97,377,316,37,234,395,325,22,296,351,362,236,35,229,133,167,370,315,397,2,471,345,365,42,192,45,61,31,444,460,320,295,146,335,433,134,189,148,316,159,22,5,466,146,246,432,192,199,296,352,326,49,419,507,354,186,340,441,192,150,136,475,268,137,168,237,429,463,449,31,85,123,389,176,95,490,394,30,89,169,126,222,147,362,88,343,80,70,500,9,42,281,425,41,475,241,71,115,92,284,324,335,68,343,105,107,322,21,169,220,254,204,379,13,250,122,411,448,301,502,87,503,452,100,57,241,236,90,219,30,397,498,64,231,170,225,286,137,212,336,11,34,477,318,208,110,482,357,3,349,264,428,246,249,240,197,105,465,336,223,74,108,427,29,507,75,423,298,12,102,75,469,495,233,149,350,275,234,378,77,128,121,125,195,420,355,34,162,191,335,306,34,87,227,3,309,453,153,320,170,84,195,293,134,207,278,98,53,36,104,55,151,330,15,91,319,165,274,326,396,332,500,457,69,288,2,56,291,407,492,456,127,268,6,264,70,36,480,67,441,192,137,51,106,188,411,352,209,427,174,88,247,269,72,236,145,426,163,165,391,321,469,316,253,364,378,125,31,295,200,86,430,83,429,317,72,70,271,163,73,405,418,19,395,23,316,395,61,299,181,269,229,249,180,494,377,159,389,205,475,322,303,2,139,324,387,28,403,60,127,291,413,275,84,18,179,309,17,301,66,442,178,29,201,107,113,303,320,255,18,433,100,117,508,255,19,482,127,232,54,127,208,132,479,402,147,132,26,345,154,35,258,335,482,168,360,174,180,72,163,99,269,27,478,267,444,259,306,14,104,284,460,8,218,259,10,162,76,13,33,129,69,106,452,124,284,490,337,344,34,391,415,272,214,499,52,162,486,478,369,453,481,341,402,300,231,429,205,97,457,120,184,100,4,57,124,481,414,350,483,179,318,321,268,412,485,193,284,316,311,115,354,511,395,16,471,25,289,271,235,226,174,365,168,200,14,384,383,80,189,88,289,409,441,63,339,372,180,426,378,297,396,198,25,5,356,344,189,166,409,282,501,204,350,499,184,63,436,319,26,129,399,481,186,178,332,286,73,489,64,127,216,299,433,41,396,296,98,327,385,350,435,509,71,418,418,349,189,229,225,10,422,376,27,275,168,72,190,87,27,361,488,22,333,244,503,139,14,389,178,435,217,421,48,154,468,486,185,66,247,20,18,108,129,56,120,108,453,231,508,48,356,364,18,3,211,470,148,244,50,39,245,489,147,144,34,63,196,401,344,445,410,240,452,306,238,127,473,109,264,234,426,174,211,292,451,54,85,378,232,478,499,392,164,41,225,197,43,233,402,264,222,162,67,298,184,208,324,120,60,388,419,407,427,171,125,130,207,108,303,12,126,129,290,409,377,90,326,201,80,15,277,22,403,213,7,152,426,53,1,10,203,117,35,242,177,318,383,394,452,467,319,46,355,421,32,189,480,235,95,100,220,182,213,365,158,67,379,166,193,18,472,427,494,410,99,317,383,393,34,204,24,124,365,81,331,222,287,187,255,314,50,143,73,499,239,265,444,120,133,311,265,210,126,277,432,221,166,386,355,312,21,327,404,234,103,455,21,391,500,14,219,373,54,78,61,474,405,17,192,289,234,135,336,400,154,216,88,228,292,6,135,416,224,309,139,183,286,116,314,418,369,311,167,70,284,283,26,429,93,138,280,76,109,131,147,346,127,460,124,208,77,297,151,320,424,457,249,229,180,235,364,330,182,239,264,200,410,395,182,259,148,285,193,225,329,171,496,143,219,454,316,279,110,230,348,369,165,363,96,202,8,93,313,141,88,486,208,74,383,64,264,187,15,258,82,22,272,64,332,77,270,279,272,266,129,345,218,293,10,341,465,163,443,283,413,138,394,120,258,280,154,250,85,59,37,168,217,184,28,378,297,67,421,316,11,25,149,503,289,310,433,283,279,254,404,202,124,336,405,183,176,51,465,29,76,23,287,102,244,327,475,294,252,104,226,32,493,214,108,128,37,163,423,345,108,244,161,142,127,30,19,211,128,397,123,386,115,467,285,149,460,431,401,490,273,337,37,243,443,367,109,198,261,233,452,395,230,478,343,103,431,379,458,104,223,412,183,27,234,462,96,31,131,428,420,66,426,264,11,218,310,37,183,408,289,63,175,182,58,267,84,273,217,354,360,444,146,106,15,201,344,159,323,313,405,314,352,470,68,267,340,57,151,269,148,435,204,499,390,363,319,229,224,183,467,206,105,252,407,372,462,8,362,137,246,491,137,196,363,123,284,85,46,101,312,464,256,368,449,298,476,219,469,429,249,110,336,377,497,291,438,16,186,240,359,289,302,377,378,35,334,103,305,508,429,44,2,505,425,293,242,36,33,259,195,492,405,127,20,456,409,276,30,69,469,182,414,214,86,329,222,265,361,280,498,300,211,262,300,166,164,455,22,496,86,355,80,405,466,308,397,320,128,320,399,157,290,101,225,385,366,90,303,357,141,198,217,106,59,243,368,492,467,408,134,458,477,417,20,509,383,169,185,415,157,174,2,110,219,104,254,323,87,455,474,233,120,416,148,21,432,268,315,373,366,341,511,295,348,159,163,111,264,59,301,156,240,127,273,33,433,204,510,485,193,129,506,125,222,110,230,216,162,481,299,2,359,124,160,176,212,179,510,431,454,215,279,99,229,330,53,219,504,241,422,487,192,311,425,394,228,507,511,386,129,228,503,50,261,120,195,277,217,33,258,465,507,447,506,207,509,272,336,468,84,240,156,120,48,470,52,247,323,26,487,424,106,441,473,15,457,306,226,425,50,51,262,132,464,390,340,380,437,374,162,426,98,160,102,69,439,236,384,262,475,248,409,220,392,189,422,101,291,299,333,31,453,433,73,134,306,306,464,505,48,338,268,444,187,438,54,237,175,305,341,267,276,306,59,29,464,47,292,251,194,455,102,211,337,508,409,269,292,385,345,440,267,500,434,509,400,331,104,250,17,79,493,71,393,96,356,11,463,142,222,484,64,100,333,80,68,232,473,289,246,69,377,169,47,185,416,362,444,119,282,72,324,365,93,113,495,396,212,160,330,494,484,186,277,139,469,364,1,24,327,399,284,142,303,210,101,354,24,458,299,299,294,490,335,354,121,444,491,356,359,386,230,501,224,10,4,236,442,31,199,384,82,179,390,327,46,154,397,1,62,89,302,329,505,466,215,494,126,341,136,210,324,456,489,287,450,87,139,425,230,323,189,213,433,302,165,238,346,154,95,361,271,241,302,13,5,448,112,475,158,59,249,282,446,390,332,45,143,468,423,448,288,77,500,401,273,435,227,60,97,157,161,488,455,203,397,250,474,30,334,64,345,88,176,189,69,157,19,499,50,312,297,76,344,194,502,245,228,363,448,132,368,218,405,316,379,356,150,408,9,132,331,286,166,418,144,106,310,355,1,113,259,16,372,373,2,348,338,347,243,93,275,370,489,243,356,340,296,494,251,9,316,41,446,133,113,19,391,444,74,329,3,4,480,438,309,455,243,239,339,321,53,327,200,267,419,159,208,176,116,380,4,10,275,406,91,25,11,58,84,451,391,379,229,248,112,225,422,345,465,254,422,171,103,115,9,144,136,470,22,165,289,232,79,368,273,75,373,72,457,133,207,336,254,163,468,392,172,429,161,281,363,73,73,187,297,466,67,318,42,68,264,211,44,158,381,110,267,456,277,325,418,37,26,261,308,17,276,479,339,507,53,423,238,98,466,64,158,312,422,218,374,262,444,425,354,462,492,165,213,204,157,506,334,481,352,446,404,319,409,80,124,98,403,305,508,239,247,451,508,298,79,18,412,275,41,16,383,252,359,347,26,508,275,309,340,91,311,357,428,503,457,120,104,60,384,305,447,137,206,481,13,420,152,6,353,24,499,84,482,41,21,219,103,134,290,310,148,98,435,367,84,48,501,145,257,282,2,200,345,364,421,392,348,339,49,20,41,186,181,469,498,170,213,44,160,120,42,109,441,117,98,93,171,135,80,245,316,21,240,14,472,467,100,359,495,501,67,186,343,61,412,471,191,184,45,318,313,485,305,425,263,336,480,39,330,206,371,398,130,465,235,146,1,416,403,50,217,451,379,480,61,379,324,466,302,83,146,45,330,420,246,343,311,104,244,343,214,193,442,462,22,241,244,281,202,251,99,366,364,60,508,368,69,220,179,216,187,335,214,477,261,318,298,240,97,213,143,288,118,178,150,464,322,240,375,406,404,466,368,291,445,46,46,271,313,427,298,255,155,115,171,125,204,205,225,13,472,218,359,152,392,78,431,269,299,60,359,485,215,95,162,69,133,111,246,91,298,272,468,258,364,182,469,231,316,83,400,56,421,463,413,249,193,383,7,373,414,38,165,510,66,430,199,453,125,231,429,192,440,243,159,289,114,399,67,231,461,53,91,224,381,208,374,391,445,205,194,121,291,58,389,456,389,455,501,167,62,140,246,193,126,239,362,99,352,466,396,24,407,241,102,223,253,54,366,150,132,282,220,107,505,257,456,135,215,204,238,446,262,461,217,63,454,314,197,190,449,36,183,217,1,169,319,184,58,152,183,95,31,256,268,369,332,55,30,383,148,235,110,503,8,440,325,299,398,22,456,328,266,262,126,292,140,211,401,399,297,54,302,432,363,310,316,55,508,333,416,394,112,260,263,392,442,125,270,403,481,412,311,323,239,412,240,171,355,335,34,121,117,179,273,491,256,495,299,346,433,153,13,480,211,440,486,192,293,460,424,279,272,191,40,84,254,90,17,89,344,438,65,392,472,378,253,504,391,55,175,343,342,167,473,41,256,96,69,134,301,381,129];